const KoaRouter = require('koa-router')


//自己写的
const {upload,getBanners} = require('../controller/banners.controller')
const {auth,isAdmin} = require('../middleware/auth.middleware')

//实例化对象
const BannersRouter = new KoaRouter({ prefix: '/banners' })

//编写路由
BannersRouter.post('/upload',auth,isAdmin,upload)


BannersRouter.get('/getBanners',getBanners)

module.exports = BannersRouter


	

	
